package uk.co.cocking.getinline2.pipeline.transformers;

import java.util.List;

import uk.co.cocking.getinline2.record.StringField;
import uk.co.cocking.getinline2.record.MapRecord;
import uk.co.cocking.getinline2.record.Record;

public class StringWrapper extends AbstractTransformer<String, Record> {
	
	private final String fieldName;

	public StringWrapper(String fieldName) {
		this.fieldName = fieldName;
	}

	@Override
	public List<Record> transform(String item) {
		return enlist(new MapRecord(new StringField(fieldName, item)));
	}

}
